Skip to content

Conversation

qwang98
Copy link
Collaborator

@qwang98 qwang98 commented Sep 17, 2025

This PR updated the openvm dependency to 1.4.0. A lot of changes were introduced, hence the size of this PR.

Not covered in this PR:

  • gpu: this PR brings us to parity with existing functionality, so only CPU is supported. See [OVM GPU] WIP feature branch #3347 for GPU support.
  • plonk: since the main proving route for openvm is using a single row, plonk support was deprioritized for now and will be eventually fixed in another PR.

Changes to openvm here
Changes to stark-backend here

Tasks:

  • make compile
  • pil export test
  • implement all extensions (Circuit, Executor, (Prover))
  • make tracegen work
  • re-enable Send + Sync bound on Executor in ovm (instead, removed the need for that bound in ovm)
  • support tco flag

@qwang98 qwang98 marked this pull request as draft September 17, 2025 05:51
[OVM 1.4] `VmConfig` related trait implementations
@Schaeff Schaeff mentioned this pull request Oct 14, 2025
7 tasks
@qwang98
Copy link
Collaborator Author

qwang98 commented Oct 20, 2025

Should we have this merged?

@qwang98 qwang98 requested a review from pacheco October 20, 2025 02:18
pacheco
pacheco previously approved these changes Oct 20, 2025
Copy link
Collaborator

@pacheco pacheco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Schaeff Schaeff added this pull request to the merge queue Oct 20, 2025

[features]
default = []
tco = ["openvm-sdk/tco"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's tco?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tail call optimization

repository.workspace = true

[features]
default = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is metrics default in cli-openvm but not here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the metrics are required for benchmarks to work on ci. Happy to remove the default and pass the feature explicitly there. For here, same, I don't have a strong opinion, but metrics sounds more like something you'd turn on only if needed.


fn pc_step(&self) -> u32 {
self.0.step
DEFAULT_PC_STEP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relies on different behavior as before. Do we not have access to the program's step anymore?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, as far as I understand, only the default is supported now.

&exe.program,
labels.clone(),
exe.program.pc_base,
exe.program.step,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

Merged via the queue into main with commit db5809f Oct 20, 2025
13 of 21 checks passed
@Schaeff Schaeff deleted the ovm-1.4 branch October 20, 2025 14:54
new_local_prover(vm_builder, &vm_pk, exe)?;

vm_instance.reset_state(inputs.clone());
let metered_ctx = vm_instance.vm.build_metered_ctx();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do all this new stuff?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was inlined from on internal function in ovm to build the proving context without calling the prover, and then run debug_proving_ctx. Agree it could be cleaner.

air_by_opcode_id.air_name_to_machine.get(air_name).unwrap();

// TODO: main_columns might not be correct, as the RA::with_capacity() uses the following `main_width()`
// pub fn main_width(&self) -> usize {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's with this function?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right this needs to be cleaned up, opened #3373 waiting for @qwang98 to check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants